package com.cong.queue;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

/**
 * @author cong
 * <p>
 * created on 2021/3/31 上午10:59
 */
public class MyQueueDemo {

    public static void main(String[] args) throws InterruptedException {

        BlockingQueue<Object> blockingQueue = new ArrayBlockingQueue<>(3);

        blockingQueue.put("a");
        blockingQueue.put("b");
        blockingQueue.put("c");

        System.out.println(blockingQueue.take());

    }
}
